How to find pythagorean triplet